<?php
/**
 * Created by PhpStorm.
 * User: zing
 * Date: 2018/5/5
 * Time: 9:30
 */


echo microtime() . PHP_EOL;
sleep(1);
echo microtime() . PHP_EOL;
$s = microtime();
sleep(2);
echo (microtime() - $s) . PHP_EOL;

echo microtime(true) . PHP_EOL;
sleep(1);
echo microtime(true) . PHP_EOL;


$start = microtime(true);
sleep(2);
$end = microtime(true);

echo $end - $start . PHP_EOL;

$start = microtime(true);
for ($i = 0; $i < 1000000;) {
    $i++;
}
$end = microtime(true);
echo $end - $start . PHP_EOL;
